<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ page import="java.util.ArrayList, edu.student.models.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<s:if test="hasActionErrors()">
   <div class="errors">
      <s:actionerror/>
   </div>
</s:if>
<s:form action="viewFriendProfile.action" method="post" name="viewFriendProfile">
<table align="center">
<tr>
<td><img src="./images/<s:property value = "friend.image" />" alt="image text" width="150" height="175"/></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td><table id="text">
   <tr><td>
    <h5>Roll No:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <s:property value="%{searchBox}" /></h5>
   <%-- <s:property value="%{searchBox}"/> --%>
   <h5>Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <s:property value="%{friend.username}" /></h5>
   </td></tr>
   <tr><td>
     <h5>Date of Birth:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <s:property value="%{friend.dob}"/></td></tr>
   <tr><td> 
   <table align="left">
   <tr><td>
   <s:if test="%{friends}">
<img src="./images/button_ok.png" alt="Already friends" width="40" height="40"/>
</s:if></td>
<td><s:else>
<img src="./images/images.jpg" alt="image text" width="40" height="40"/>
</s:else></td>
  <td>  <s:checkbox name="friends"  label="Friend?" fieldValue="true" disabled="%{friends}" value="%{friends}"/></td>
    </table>
     <tr><td>
   <!-- <table id="text"> -->
    Interests: &nbsp; &nbsp;<s:iterator value="friend.Interests"> &nbsp; <s:property value = "interestName" /></s:iterator>
    <s:submit method="execute" value="Add as Friend" name="commandButton" disabled="%{friends}" key="" align="center"  id="submit_btn" onclick=" return clickst()" />
    <!--  </table>--></td>
    </tr>
</table> 	
</s:form>
</body>
</html>